/* Layout */
import Layout from '@/layout'

export const constantRoutes = [{
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },
  // 404
  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },
  // 根路径
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [{
      path: 'dashboard',
      name: 'Dashboard',
      component: () => import('@/views/dashboard/index'),
      meta: {
        title: 'Dashboard',
        icon: 'dashboard'
      }
    }]
  },
]
export const asyncRoutes = [
  // 权限管理
  {
    path: '/acl',
    name: 'Acl',
    component: Layout,
    redirect: '/acl/user/list',
    meta: {
      title: '权限管理',
      icon: 'dashboard'
    },
    children: [{
        path: 'user/list',
        name: 'User',
        component: () => import('@/views/acl/user'),
        meta: {
          title: '用户管理'
        },
      },
      
    ]
  },

  // 信息管理
  {
    path: '/product',
    name: 'Product',
    component: Layout,
    redirect: '/product/like/list',
    meta: {
      title: '商品管理',
      icon: 'dashboard'
    },
    children: [{
        path: 'like/list',
        name: 'Like',
        component: () => import('@/views/product/like'),
        meta: {
          title: '猜你喜欢'
        }
      },
      {
        path: 'movie/list',
        name: 'Movie',
        component: () => import('@/views/product/movie'),
        meta: {
          title: '电影管理'
        }
      },
      {
        path: 'cart/list',
        name: 'Cart',
        component: () => import('@/views/product/cart'),
        meta: {
          title: '订单管理'
        }
      }
    ]
  },
]
// {
//         path: 'role/list',
//         name: 'Role',
//         component: () => import('@/views/acl/role'),
//         meta: {
//           title: '角色管理'
//         }
//       }
// 404
export const anyRoutes = {
  path: '*',
  redirect: '/404',
  hidden: true
}
